package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.entity.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User login(String username, String password) {
        return userDao.findUser(new User(username,password));
    }

    @Override
    public void updatePwd(String username, String password, String name, String remark) {
        userDao.updateUser(new User(username,password,name,remark));
    }
}
